﻿using ElectricalSymbols.Storyboards;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Animation;

namespace ElectricalSymbols
{
	/// <summary>
	/// 隔离开关_竖直_刀下_分.xaml 的交互逻辑
	/// </summary>
	public partial class DisVD : UserControl
	{
		OpenStory openStory;
		CloseStory closeStory;


		public bool Open
		{
			get => (bool)GetValue(OpenProperty);
			set
			{
				SetValue(OpenProperty, value);
				if (value)
				{
					openStory.Run();
				}
				else if (!value)
				{
					closeStory.Run();
				}
			}
		} 

		public static readonly DependencyProperty OpenProperty =
			DependencyProperty.Register("Open", typeof(bool), typeof(KnifeSwitch), new PropertyMetadata(true));



		public DisVD()
        {
            InitializeComponent();
			openStory=new OpenStory(dis);
			closeStory=new CloseStory(dis);
		}

    }
}
